<script setup lang="ts">
import WechatPay from "./WechatPay.vue"
import { useAdminPayStore } from "../store/adminPay"
import AliPay from "./AliPay.vue"

const { common } = useAdminPayStore()
</script>

<template>
  <t-row class="container">
    <t-card class="card" header-bordered title="支付设置">
      <template #actions>
        <t-button size="small" @click="common.saveConfig">保存</t-button>
      </template>
      <t-space direction="vertical" class="space">
        <t-radio-group variant="default-filled" v-model="common.showType">
          <t-radio-button value="1">微信官方</t-radio-button>
          <t-radio-button value="2">支付宝官方</t-radio-button>
        </t-radio-group>
      </t-space>
      <t-row class="main">
        <WechatPay />
        <AliPay />
      </t-row>
    </t-card>
  </t-row>

</template>

<style scoped lang="less">
@border-color: var(--td-component-border);
.container {
  border: @border-color 1px solid;
  padding: 10px;
  margin: 10px 0;
  .card{
    width: 100%;
    .space{
      width: 100%;
    }
    .main{
      border: @border-color 1px solid;
      margin: 20px;
      box-sizing: border-box;
    }
  }
}
</style>
